package com.cmbchina.designpattern.application;

import com.cmbchina.designpattern.application.house.ThatchedHouse;
import lombok.Data;

@Data
public class Pig {
    /**
     * 小猪名字
     */
    private String name;

    /**
     * @param name 初始化的小猪名字
     */
    public Pig(String name) {
        this.name = name;
    }

    /**
     * @return 修建好的茅草房
     */
    public ThatchedHouse buildThatchedHouse() {
        ThatchedHouse house = new ThatchedHouse();
        house.buildDetail();
        return house;
    }

}
